﻿<%@ include file="../include/top.jsp" %>
<%@ include file="../include/errorArea.jsp" %>
<script>document.title="密码修改";</script>

<p>&nbsp;</p>
<table width="400" border="0" align=center cellpadding="4" cellspacing="1">
  <form method="POST" name="saveForm" action="${baseURL}/systemUser/updatePW" onsubmit="return checkInput()">
    <tr align="center"> 
      <td colspan="2" class="titleBgColor"><b>修改密码</b></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="120" align="right">原密码：</td>
      <td> <input type="password" name="pw" id="password" size="20" class="myInput"> 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td align="right">新密码：</td>
      <td> <input type="password" name="newPassword" id="newPassword" size="20" class="myInput"> 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td align="right">确认密码：</td>
      <td> <input type="password" name="newPassword2" id="newPassword2" size="20" class="myInput"> 再输入一次新密码
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td></td>
      <td> <input type="submit" value="--&gt; 确认修改" class="myButton"> 
      <font color="red">${msg}</font></td>
    </tr>
  </form>
</table>

<script>
function checkInput(){
	oldPassword = document.getElementById("password");
	if(oldPassword.value==""){
		alert("请输入旧密码。");
		oldPassword.focus();
		return false;
	}
	newPassword = document.getElementById("newPassword");
	if(newPassword.value==""){
		alert("请输入新密码。");
		newPassword.focus();
		return false;
	}
	newPassword2 = document.getElementById("newPassword2");
	if(newPassword2.value==""){
		alert("请输入新密码（确认）。");
		newPassword2.focus();
		return false;
	}
	if(newPassword.value!=newPassword2.value){
		alert("两次输入的新密码不一致。");
		newPassword.focus();
		return false;
	}
	return true;
}
</script>
<%@ include file="../include/bottom.jsp" %>